﻿using Microsoft.Extensions.Configuration;
using System;

namespace Common5173.ASPNetCore.Tool
{
    public static class Variables
    {
        public static string GetVariablesEnvironmentFirst(this IConfiguration config,string key)
        {
            var value=Environment.GetEnvironmentVariable(key);
            if (string.IsNullOrEmpty(value))
            {
                return config.GetSection(key).Value;
            }
            return value;
        }
    }
}
